package com.dys.designpattern.simplefactory.applycar.controller;

import com.dys.designpattern.simplefactory.applycar.factory.CarFactory;
import com.dys.designpattern.simplefactory.applycar.service.ICar;

/**
 * @Author: 疾风
 * @ClassName: BuyCarFactoryController
 * @Description: 购买汽车
 * @CreateDate: 2024/05/14
 * @Version: v1.0.0
 */
public class BuyCarFactoryController {
    public static void main(String[] args) {
        ICar car1 = CarFactory.getCar("五菱");
        ICar car2 = CarFactory.getCar("特斯拉");
        ICar car3 = CarFactory.getCar("比亚迪");

        car1.name();
        car2.name();
        car3.name();
    }
}
